﻿<%@ page language="java" isELIgnored="false"
	contentType="text/html; charset=utf-8" pageEncoding="utf-8"%>

<style type="text/css">
.title1 {
	width: 100px;
}

.title2 {
	width: 200px;
}
</style>
<div id="PaperHBox" style="display:none;">
	<form id="PaperForm" method="post" style="margin-top: 20px;">
		<input name="paperId" class="clean_c">
		<ul class="list">
		     
		  
			<li><strong>测评项目:</strong>
				<div class="fl">
				  <select id="ProjectCombox_paper" name="projectId" class="ipt nickname clean_c" style="width: 300px;"  onchange="tocheckProject(this.value)"></select><div id="projectSpan"></div>
				</div>
		   </li>
		    <li><strong>试卷名称:</strong>
				<div class="fl">
					 <input type="text" class="ipt nickname clean_c" id="paperName" name="paperName" style="width:300px ;">
				</div>
		   </li>
		   <li><strong>题目难度:</strong>
				<div class="fl">
					<select id="DictionaryCombox"  name="degree" class="ipt nickname clean_c" style="width: 300px;"  onchange="tocheckDegree(this.value)">	
				    </select>	
				</div>
		    </li>
			<li><strong>单选题数量:</strong>
				<div class="fl">
					 <input type="text" class="ipt nickname clean_c" id="number" name="number"  style="width: 300px;">	<span id="spanNumber"></span>		
				</div></li>
			<li><strong>判断题数量:</strong>
				<div class="fl">
					 <input type="text" class="ipt nickname clean_c" id="judgementChoose" name="judgementChoose"  style="width: 300px;"><br><span id="judgementChooseSpan"></span>		
				</div></li>
			<li><strong>多选题数量:</strong>
				<div class="fl">
					 <input type="text" class="ipt nickname clean_c" id="multipltChoose" name="multipltChoose"  style="width: 300px;">	<span id="multipltChooseSpan"></span>		
				</div>
			 </li>
				
			<li><strong>试卷时长:</strong>
				<div class="fl">
					 <input type="text" class="ipt nickname clean_c" id="time" name="time"   style="width: 270px;">分钟
				</div>
		   </li>
			<li><input value="保存" class="submitBtn col-md-5" id="submitPaper"
				type="button"></li>
		</ul>
	</form>
</div>
<script language="JavaScript">
function tocheckProject(x){

	$.ajax({ 
		type:"POST", 
		cache:false, 
		url : "../TitleTypeProejctController/findByCondition.action", 
		dataType : "text", 
		async:false, 
		data:{
			"projectId":$("#ProjectCombox_paper").val(),
		}, 
		success : function(data){ 
			var obj = JSON.parse(data);
		    $("#projectSpan").html("<font fontsize='5' color='red'>"+"该项目现有题目类型：         <br>"+obj.str+"</font>");
		
		},
		error : function(request) {
			toastr.error("发送失败");
		}
	});
}
function tocheckDegree(x){
		$.ajax({ 
		type:"POST", 
		cache:false, 
		url : "../TitleController/findByCondition.action", 
		dataType : "json", 
		async:false, 
		data:{
			"extend1":x,
			"extend2":"1",
		}, 
		success : function(data){ 
		$("#spanNumber").html("<font fontsize='5' color='red'>"+"题库该类型题目数量         "+data.length+"</font>");  
		    
		} 
		}); 	
		$.ajax({ 
			type:"POST", 
			cache:false, 
			url : "../TitleController/findByCondition.action", 
			dataType : "json", 
			async:false, 
			data:{
				"extend1":x,
				"extend2":"2",
			}, 
			success : function(data){ 
			$("#judgementChooseSpan").html("<font fontsize='5' color='red'>"+"题库该类型题目数量         "+data.length+"</font>");  
			    
			} 
			}); 	
		$.ajax({ 
			type:"POST", 
			cache:false, 
			url : "../TitleController/findByCondition.action", 
			dataType : "json", 
			async:false, 
			data:{
				"extend1":x,
				"extend2":"3",
			}, 
			success : function(data){ 
			$("#multipltChooseSpan").html("<font fontsize='5' color='red'>"+"题库该类型题目数量          "+data.length+"</font>");  
			    
			} 
			}); 	
}
</script>